﻿using System;
using System.Text.RegularExpressions;

namespace CentroVentas.Clases
{
    class Validaciones
    {

        public static Boolean ValidarEmail(String email)
        {
            String expresion;
            expresion = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
            if (Regex.IsMatch(email, expresion))
            {
                if (Regex.Replace(email, expresion, String.Empty).Length == 0)
                    return true;                
                else                
                    return false;                
            }
            else
                return false;            
        }
    }

    
}
